package ift605.EquationWithAgent.server;

import java.io.Serializable;

import udes.ds.agent.AbstractEquation;

// Message DerivativeAgent and DeriveSlaveSagent use to communicate
public class EquationMessage implements Serializable{
	private static final long serialVersionUID = 1L;
	public final static String RESULT_ID = "Result";		// Mean it's the result of a request
	public final static String DERIVATE_ID = "Derivate";	// Mean it's a request of derivation
	private int mRequestNumber;
	private int mIdentifier;
	private AbstractEquation mEquation;
	
	public EquationMessage(int aRequestNumber, AbstractEquation aEquation){
		mRequestNumber = aRequestNumber;
		mIdentifier = -1;
		mEquation = aEquation;
	}
	
	public EquationMessage(int aRequestNumber, AbstractEquation aEquation, int aIdentifier){
		mRequestNumber = aRequestNumber;
		mIdentifier = aIdentifier;
		mEquation = aEquation;
	}
	
	public int getRequestNumber(){
		return mRequestNumber;
	}
	
	public int getIdentifier(){
		return mIdentifier;
	}
	
	public AbstractEquation getEquation(){
		return mEquation;
	}
}
